// @ts-ignore
/* eslint-disable */
import request from '@/services/request';

/** 普通文章详情 GET /v1/articles/${param0}/recommend */
export async function articleV1ControllerRecommend(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.ArticleV1ControllerRecommendParams,
  options?: { [key: string]: any },
) {
  const { uuid: param0, ...queryParams } = params;
  return request<API.ArticleIndexNormalResult[]>(`/v1/articles/${param0}/recommend`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 我的文章列表 GET /v1/articles/mine */
export async function articleV1ControllerIndexMine(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.ArticleV1ControllerIndexMineParams,
  options?: { [key: string]: any },
) {
  return request<{ total: number; list: API.ArticleIndexMineResult[] }>('/v1/articles/mine', {
    method: 'GET',
    params: {
      // pageSize has a default value: 20
      pageSize: '20',

      ...params,
    },
    ...(options || {}),
  });
}

/** 新增我的文章 POST /v1/articles/mine */
export async function articleV1ControllerCreateMine(
  body: API.ArticleCreateDto,
  options?: { [key: string]: any },
) {
  return request<API.ArticleCreateResult>('/v1/articles/mine', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 我的文章详情 GET /v1/articles/mine/${param0} */
export async function articleV1ControllerShowMine(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.ArticleV1ControllerShowMineParams,
  options?: { [key: string]: any },
) {
  const { uuid: param0, ...queryParams } = params;
  return request<API.ArticleShowMineResult>(`/v1/articles/mine/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 删除我的文章 DELETE /v1/articles/mine/${param0} */
export async function articleV1ControllerDestroyMine(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.ArticleV1ControllerDestroyMineParams,
  options?: { [key: string]: any },
) {
  const { uuid: param0, ...queryParams } = params;
  return request<any>(`/v1/articles/mine/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 修改我的文章 PATCH /v1/articles/mine/${param0} */
export async function articleV1ControllerUpdateMine(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.ArticleV1ControllerUpdateMineParams,
  body: API.ArticleUpdateDto,
  options?: { [key: string]: any },
) {
  const { uuid: param0, ...queryParams } = params;
  return request<any>(`/v1/articles/mine/${param0}`, {
    method: 'PATCH',
    headers: {
      'Content-Type': 'application/json',
    },
    params: { ...queryParams },
    data: body,
    ...(options || {}),
  });
}

/** 普通文章列表查询 GET /v1/articles/normal */
export async function articleV1ControllerIndexNormal(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.ArticleV1ControllerIndexNormalParams,
  options?: { [key: string]: any },
) {
  return request<{ total: number; list: API.ArticleIndexNormalResult[] }>('/v1/articles/normal', {
    method: 'GET',
    params: {
      // pageSize has a default value: 20
      pageSize: '20',

      ...params,
    },
    ...(options || {}),
  });
}

/** 普通文章详情 GET /v1/articles/normal/${param0} */
export async function articleV1ControllerShowNormal(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.ArticleV1ControllerShowNormalParams,
  options?: { [key: string]: any },
) {
  const { uuid: param0, ...queryParams } = params;
  return request<API.ArticleShowNormalResult>(`/v1/articles/normal/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}
